Simulating the truck rating response
5 Tasks
30 mins
Scenario
When the vendor registers the truck, the Executive Manager will review and either approve or reject the truck. If the truck is approved, the City Manager will be assigned the task of ranking the companies that will provide truck services for that city.
To rank the companies, the City Manager will retrieve the truck rating from an external system by providing the VIN. The average rating of all trucks belonging to that company will become the initial rating of the company. It is important to note that the external truck system rating must be simulated.
Simulating the external truck system rating will involve creating a test environment that mimics the behavior of the actual external system. This can be done by creating a mock API that returns test data that simulates the behavior of the external system. The mock API can be designed to return different ratings for different companies, allowing the City Manager to test the ranking process with different scenarios.
Once the external truck system rating is simulated, the City Manager can use the retrieved ratings to rank the companies that will provide truck services for the city. The ranking process can be based on a variety of factors, such as the average rating of the company's trucks, the number of trucks the company has, and the company's reputation in the industry.
Overall, simulating the external truck system rating is an important step in ensuring that the ranking process is accurate and reliable. By creating a test environment that mimics the behavior of the actual external system, the City Manager can test the ranking process with different scenarios and ensure that the ranking is based on accurate and reliable data.
The following table provides the credentials you need to verify the solution:
Role | User name | Password |
---|---|---|
Admin | admin@deliveryservice | rules |
Detailed Tasks
1 Identify design options
Option 1
Enable the Simulate data source option for the data page, then create a data transform to simulate the response.
Option 2
Associate a simulation activity with the rest connector.
Option 3
Create a REST service and get the rating from this service.
2 Evaluate the design options
Design approach | Pros | Cons |
---|---|---|
Simulate data source |
|
|
Connector simulation activity |
|
|
Create REST service |
|
|
3 Recommend the best design option
In this scenario, we use the Simulate data source approach because it is easily configurable and has multiple source options.
4 Identify required configuration tasks
- On the data page that invokes the connector, toggle the simulation on.
- To set the rating, update the source to a data transform or an activity.
5 Review Solution details
- Log in with admin@deliveryservice and the password rules, and switch to the MDC application.
- Locate the Retrieve truck rating data page under the GTRS data type.
- Click Toggle simulation or switch to Dev Studio and select the Simulate data source checkbox.
Selecting the checkbox in Dev Studio
- To set the truck rating and other required properties, update the source to a data transform or an activity.
Confirm your work
Available in the following mission:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?